"use strict"

const logindb = require('../Models/loginDB');

var loginDBObject = new logindb();

function routeLogin(app){
    app.route('/login')
         .get(loginDBObject.getAllLogin);
    app.route('/delete/:id')
         .delete(loginDBObject.deletelogin);
    app.route('/update/:id')
         .put(loginDBObject.updateLogin);
    app.route('/adduser')
         .post(loginDBObject.addLogin);
    app.route('/nlogin')
         .post(loginDBObject.getLoginCredentials);
     app.route('/updateUser')
         .post(loginDBObject.updateUserPassword);
}

module.exports = {routeLogin};